package com.hiray.demos.ui_architect.litho

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.facebook.litho.ComponentContext
import com.facebook.litho.LithoView
import com.facebook.litho.sections.SectionContext
import com.facebook.litho.sections.widget.RecyclerCollectionComponent
import com.hiray.demos.ui_architect.litho.list.ListSection

class LithoSimpleRecyclerViewActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val context = ComponentContext(this)

        val recyclerListView = RecyclerCollectionComponent.create(context)
                .section(ListSection.create(SectionContext(context)).build())
                .build()
        setContentView(LithoView.create(context, recyclerListView))
    }
}
